﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Core.Utilities;
using VOL.Entity.DomainModels;
using VOL.Smartmanufacturing.Infrastructure;
using VOL.Smartmanufacturing.IServices.WatchedPlatform;

namespace VOL.Smartmanufacturing.Services.WatchedPlatform
{
    /// <summary>
    /// 产品维护维护显示
    /// </summary>
    public class MaintenanceShow : IMaintenanceShow
    {
        private readonly IBaseRepository<Maintenance> _maintenanceRepository;

        public MaintenanceShow(IBaseRepository<Maintenance> maintenanceRepository)
        {
            _maintenanceRepository = maintenanceRepository;
        }
        public async Task<WebResponseContent> GetMaintenanceShow()
        {
            var maintenances = _maintenanceRepository.GetAll();
            var response = WebResponseContent.Instance.OK("查询成功", maintenances);
            return await Task.FromResult(response);
        }
    }
}
